package com.example.springbootsfzy.globalexception;

import com.example.springbootsfzy.util.R;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
//@ControllerAdvice
public class GlobalException {
    @ExceptionHandler(Exception.class)
    public R exception(Exception e) {
        System.out.println("全局报错提醒!");
        return R.fail(e.getMessage());
    }
}
